perm filename DDERIV.TIM[TIM,LSP] blob sn#772850 filedate 1984-10-08 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00023 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	 SAIL
C00006 00003	∂06-Jul-82  1724	ARPAVAX.fateman at Berkeley   
C00008 00004	∂16-Jul-82  0012	Mabry Tyson <Tyson at SRI-AI> 	DERIV, DDERIV, FDDERIV results    
C00013 00005	LM-2
C00014 00006	DDERIV
C00015 00007	DDERIV
C00016 00008	 NIL
C00017 00009	 SCORE Dec 12, 1983
C00018 00010	 InterLisp Vax 780
C00019 00011	 PSL-20 3.3
C00020 00012	 PSL-Cray 3.2
C00022 00013	 PSL-750 3.2
C00023 00014	 PSL-780 3.2
C00024 00015	 PSL-DN600 3.2
C00025 00016	 PSL-DN300 3.2
C00026 00017	 PSL-dn160
C00027 00018	 Franz Sun II
C00031 00019	 PERQ 6/19/84
C00032 00020	 PSL Numbers 7/31/84
C00033 00021	 LMI/Tyson 15-Aug-84  1920
C00034 00022	 PSL-3081
C00035 00023	 3600 Sept 12, 1984
C00036 ENDMK
C⊗;
; SAIL
(fasload dderiv)
(timit)
Timing performed on Friday 07/16/82 at 10:26:07.
Cpu Time = 3.285
Elapsed Time = 320.116665
Wholine Time = 45.9
GC Time = 19.913
Load Average Before  = 3.65508044
Load Average After   = 5.23962355
Average Load Average = 4.447352
NIL 
Timing performed on Friday 07/16/82 at 10:43:01.
Cpu Time = 3.288
Elapsed Time = 202.766666
Wholine Time = 45.233333
GC Time = 19.452
Load Average Before  = 1.68017912
Load Average After   = 2.96003354
Average Load Average = 2.32010633
NIL 
Timing performed on Friday 07/16/82 at 10:46:59.
Cpu Time = 3.282
Elapsed Time = 156.6
Wholine Time = 45.9166665
GC Time = 19.847
Load Average Before  = 2.6731608
Load Average After   = 2.91310465
Average Load Average = 2.79313272
NIL 
;;; New SAIL
(timit)
Timing performed on Wednesday 10/12/83 at 22:21:02.
Cpu (- GC) Time = 2.826
Elapsed Time = 97.283334
Wholine Time = 38.616667
GC Time = 18.283
Load Average Before  = 1.3037759
Load Average After   = 1.98685336
Average Load Average = 1.64531463
NIL 
Timing performed on Wednesday 10/12/83 at 22:23:13.
Cpu (- GC) Time = 2.826
Elapsed Time = 89.35
Wholine Time = 36.0333333
GC Time = 18.288
Load Average Before  = 1.76626956
Load Average After   = 2.08296072
Average Load Average = 1.92461514
NIL 
∂06-Jul-82  1724	ARPAVAX.fateman at Berkeley   
Date: 6 Jul 1982 17:02:05-PDT
From: ARPAVAX.fateman at Berkeley
To: rpg@su-ai
Cc: ARPAVAX.jkf@Berkeley

dderiv under the same conditions, 30.8 sec, 17.28 in GC.
[same conditions =

I just ran DERIV; Franz Lisp opus 38.20 on a vax 11/780 running with
a load average of between .5 and .8  (light).  Recorded time 27 seconds
of which 16 were in garbage collection.
The only change to the file was to declare (localf der1 deriv).]

∂06-Jul-82  1740	ARPAVAX.fateman at Berkeley   
Date: 6 Jul 1982 17:35:21-PDT
From: ARPAVAX.fateman at Berkeley
To: rpg@su-ai
Cc: ARPAVAX.jkf@Berkeley

jkf reminded me to do (sstatus translink on)  to get faster times,
so with that, on a 780:
deriv = 25,2, 16.9 of which is GC
dderiv = 27.4, 17.6 of which is GC

fdderiv requires subrcall which we don't have exactly.  I haven't
looked to see how funcall can work instead.

∂16-Jul-82  0012	Mabry Tyson <Tyson at SRI-AI> 	DERIV, DDERIV, FDDERIV results    
Date: 16 Jul 1982 0003-PDT
From: Mabry Tyson <Tyson at SRI-AI>
Subject: DERIV, DDERIV, FDDERIV results
To: rpg at SU-AI

Results for DERIV, DDERIV, FDDERIV for UCILISP (UT's version).

All timings are on SRI-AI's 2060 with load average around 0.2.

Notes on coding of the programs:
UCILISP open codes MAPCAR if the function is specified by a
LAMBDA expression but does not if the function is a defined function.
Therefore, (MAPCAR 'FOO BAR) was translated into (MAPCAR (FUNCTION
(LAMBDA (X) (FOO X))) BAR) to keep in the spirit of the open coded
version sent out.

DDERIV and FDDERIV involve calling a function which is the value of
a local variable.  In UCILISP this may be done by simply calling
(FOO ...) where FOO is the local variable rather than fooling with
FUNCALL or SUBRCALL.  This format handles both cases.  With (NOUUO
NIL), these function calls do not become direct jumps (because the
value may change next time).

There was a slight problem in having the compiler produce SUBR code
to be stored under a different property (DERIV).  It could be done
but not conveniently.  So I just compiled the code as SUBR's and
editted the LAP code to make it load onto the DERIV property.

DDERIV and FDDERIV were the version that had the (CONS 'TIMES A) in
the definition for TIMES.

The loop was a PROG which had 5 calls to DERIV and looped 1000 times.
The function that did this was compiled to minimize the overhead.
In order to compute the overhead, I had a similar loop that called
a dummy function that just returned its arguments.  Its cost was
about 0.21 seconds for the (NOUUO T) case and about 0.04 seconds
for the (NOUUO NIL) case.  I did NOT subtract these out in the following
results (but I feel they should be).

Each test run produced about 265000 conses and I had about 150000 free words.
I did a GC before each run to keep things as constant as possible.

Function	(NOUUO T)		(NOUUO NIL)

DERIV		14.879-0.875 (.213)	4.451-0.868 (.043)
DDERIV		16.250-0.856 (.198)	4.983-0.855 (.044)
FDDERIV		16.073-0.873 (.211)	4.857-0.871 (.028)
DDERIV*		18.171-1.742 (.212)	6.091-1.717 (.043)

The format of the times are
		total-gc (dummy)
where total is the total CPU time (including GC), GC is the amount used for
garbage collection and dummy is the amount of time used by the dummy loop.  I
believe the clock ticks about every 0.015 seconds which explains the
difference between the .028 and .044 dummy times (one less tick).

Explanation of results:
I believe the second and third to be slower because the property list of
the variable (whose value was the property name) had to be searched twice,
first for a function property and then for the value of the variable.
Then, for the DDERIV case, another property list had to be searched to
find the function definition.

The DDERIV* case is one in which a FUNCALL is used.  In UCILISP this
results in an extra CONS and a call to APPLY* which then does everything
done above.  As you can see, it is slower.
-------

;;;LM-2
;; 8. DDERIV

(DEFUN TEST-DDERIV ()
  (TIMING "DDERIV" (RUN)))

;; Compiled:  25.4 seconds.
;;DDERIV

D3
Property 4 deep
Elapsed	33.308
GC	20.1
CPU	13.208

Property had of plist
Elapsed	33.0
GC	20.3
CPU	12.7

D3
1/25/84 with interrupts
CPU	17.7
GC	 9.0
;;DDERIV
D2
Elapsed	100.0
SWAP	.113
CPU	56.6
GC 	43.6
PGFLT	54
DSKOPS	3

D1
1/25/84 with interrupts
Elapsed	 92.8
CPU	 33.3
GC	 59.5
;;; NIL

DDERIV

Fix fixnum-only functions (probably negligible in this case).
(Fortuitously, NIL compilation of (mapcar 'foo ...) works the same as
(mapcar #'foo ...), even though technically it should not.)

Try 1:
cpu=34.06,elapsed=35.35,pagefaults=4733
Try 2:
cpu=34.1,elapsed=35.38,pagefaults=4698

Totally inline-coded carcdr (etc.).  (Note the current mapcar uses
the "normal", i.e. error-checking, car/cdr/rplaca/rplacd.  I have an
uninstalled "fix" for this somewhere or other.)

cpu=27.36,elapsed=29.08,pagefaults=4697
cpu=27.38,elapsed=28.81,pagefaults=4709
cpu=26.6,elapsed=29.0,pagefaults=4733
;;; SCORE Dec 12, 1983

not Block compiled

28.067 seconds
9.126 gc
;;; InterLisp Vax 780

DDERIV:
←(TIME (RUN]
260032 conses
38.272 seconds
NIL

←LOAD(DDERIV.V]
compiled on 14-AUG-84 16:50:13
File Created:11-FEB-83 14:21:49
DDERIVCOMS
/lisp/rbates/lisp/dick/DDERIV.V
←(TIME (RUN]
260033 conses
29.968 seconds
NIL
;;; PSL-20 3.3

DDeriv Test, also same as FDDeriv
Timing performed on DEC-20
23-Mar-84 05:05:19 .
*** Garbage collection starting
*** GC 4: time 1035 ms, 253407 recovered, 253407 free
*** Garbage collection starting
*** GC 5: time 1035 ms, 253448 recovered, 253449 free
........................................
Cpu (- GC) Time = 6.006 secs
Elapsed Time = 9.0 secs
GC Time = 2.07 secs
Load Average Before  = 1.1
Load Average After   = 1.1
Average Load Average = 1.1
;;; PSL-Cray 3.2
;;; Times are in milliseconds

 08:23:55 002:52.110 DDeriv Test, also same as FDDeriv 
 08:24:36 003:05.621 Cpu (- GC) Time = 1422.06800000 secs$2 ε
 08:24:37 003:06.141 Elapsed Time = 0. secs    
 08:24:39 003:06.662 GC Time = 2506.81300000 secs$2 ε
 08:24:41 003:07.182 Load Average Before  = 0  
 08:24:43 003:07.703 Load Average After   = 0  
 08:24:45 003:08.223 Average Load Average = 0. 

DDeriv Test, also same as FDDeriv 
Timing performed on CRAY  
23-apr-84 12:00:00.       
........................................  
Cpu (- GC) Time = 1447.27000000 secs      
Elapsed Time = 0. secs    
GC Time = 1167.99400000 secs      
Load Average Before  = 0  
Load Average After   = 0  
Average Load Average = 0. 
;;; PSL-750 3.2

Cpu (- GC) Time = 19.448 secs
Elapsed Time = 0.0 secs
GC Time = 3.893 secs
Load Average Before  = 0
Load Average After   = 0
Average Load Average = 0.0
;;; PSL-780 3.2

Cpu (- GC) Time = 10.234 secs
Elapsed Time = 0.0 secs
GC Time = 2.108 secs
Load Average Before  = 0
Load Average After   = 0
Average Load Average = 0.0
;;; PSL-DN600 3.2

Cpu (- GC) Time = 27.296 secs
Elapsed Time = 0.0 secs
GC Time = 5.224 secs
Load Average Before  = 0
Load Average After   = 0
Average Load Average = 0.0
;;; PSL-DN300 3.2

Cpu (- GC) Time = 28.953 secs
Elapsed Time = 0.0 secs
GC Time = 6.245 secs
Load Average Before  = 0
Load Average After   = 0
Average Load Average = 0.0
;;; PSL-dn160

DDeriv Test, also same as FDDeriv
Timing performed on Apollo
today 12:00:00.
........................................
Cpu (- GC) Time = 14.9719999 secs
Elapsed Time = 0.0 secs
;;; Franz Sun II

∂18-May-84  1216	jkf%ucbkim@Berkeley 
Received: from UCB-VAX.ARPA by SU-AI.ARPA with TCP; 18 May 84  12:15:38 PDT
Received: from ucbkim.ARPA by UCB-VAX.ARPA (4.24/4.27)
	id AA14785; Fri, 18 May 84 12:15:41 pdt
Received: by ucbkim.ARPA (4.24/4.27)
	id AA21234; Fri, 18 May 84 12:15:23 pdt
Date: Fri, 18 May 84 12:15:23 pdt
From: John Foderaro <jkf%ucbkim@Berkeley>
Message-Id: <8405181915.AA21234@ucbkim.ARPA>
To: rpg@su-ai

--- Benchmark dderiv run on franz at Fri May 18 07:33:22 PDT 1984 by jkf
--- cpu usage: 7:33am up 1:51, 4 users, load average: 0.87, 1.08, 1.14
Franz Lisp, Opus 40.03
(c) copyright 1984 by Franz Inc., Oakland Ca.
-> [fasl dderiv.o]
t
-> benchmark: test (file deriv) , tranlinks: on, localf: no
executing form: (run)
begin (130 299)
end (4156 3265)
runs 1
avg cpu time 17.66666666666667, avg gc time 49.43333333333333

benchmark: test (file deriv) , tranlinks: off, localf: no
executing form: (run)
begin (4160 3265)
end (9650 6237)
runs 1
avg cpu time 41.96666666666667, avg gc time 49.53333333333333

nil
-> Franz Lisp, Opus 40.03
(c) copyright 1984 by Franz Inc., Oakland Ca.
-> [fasl dderiv-l.o]
t
-> benchmark: test (file deriv) , tranlinks: on, localf: yes
executing form: (run)
begin (130 297)
end (4016 3257)
runs 1
avg cpu time 15.43333333333333, avg gc time 49.33333333333334

benchmark: test (file deriv) , tranlinks: off, localf: yes
executing form: (run)
begin (4020 3257)
end (8121 6212)
runs 1
avg cpu time 19.1, avg gc time 49.25

nil
-> Franz Lisp, Opus 40.03
(c) copyright 1984 by Franz Inc., Oakland Ca.
-> [load dderiv.l]
[load benchmac.l]
t
-> benchmark: test (file deriv) , tranlinks: on, interpreted 
executing form: (run)
begin (161 306)
end (18791 4307)
runs 1
avg cpu time 243.8166666666667, avg gc time 66.68333333333334

benchmark: test (file deriv) , tranlinks: off, interpreted 
executing form: (run)
begin (18796 4307)
end (37436 8309)
runs 1
avg cpu time 243.9666666666667, avg gc time 66.7

nil
-> --- cpu usage: 7:49am up 2:07, 4 users, load average: 1.00, 1.00, 1.00
--- end of benchmark dderiv

;;; PERQ 6/19/84

151.16 seconds (stopwatch)

7/31/84
Benchmark       % of old time   Time    Machine used
DDeriv          90%             136.33  Joe's T2

	DDeriv			 77.7
;;; PSL Numbers 7/31/84

          |KL-10b|  20-60 | 20-60 | 3600 | 20-60 | CRAY | 12Mhz| HP-UX
Benchmark |MACLSP|InterLsp|PSL 3.2| ZetaL|PSL 3.3|PSL3.2| HP200|PSL3.3
--------------------------------------------------------------------------
DDeriv    |  2.83|  28.067| 6.04  | 14.6 |  6.61 | 1.444| 16.03| 16.78
;;; LMI/Tyson 15-Aug-84  1920
		Timing 1	Timing 2
DDeriv		25.3 (6.8)	24 (5.98)

;;; LMI/Carrette 9-4-84
Test       MacroCompiled    Microcompiled
DDERIV        13.8              TBA
;;; PSL-3081
            |  CRAY  | BPS  400K bytes|  BPS   150K    | BPS   150K
Benchmark   | PSL 3.2| HEAP 800K bytes|  HEAP 1510K    | HEAP 1510K
---------------------------------------------------------------------------
DDeriv      | 1.416  | 1.212 + 1.392  | 1.225 + 1.112  | 1.214 + 1.113
;;; 3600 Sept 12, 1984

		Real, no IFU	Real, IFU	Ratio	CPU, no IFU	CPU, IFU	Ratio
    DDeriv	18.24		14.03		1.30	18.21		13.87		1.31